﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FacturaSelecGrid.ascx.cs" 
Inherits="UILGestion.ObraAdmin.RecepcionDoc.FacturaSelecGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript">
     function SelectAll(frm, id) {

         var frm = document.getElementById("itemPlaceHolderContainer");
         for (i = 1; i < frm.rows.length; i++) {
             var checkbox = frm.rows[i].cells[0].childNodes[1];
             if (checkbox != null)
                 checkbox.checked = document.getElementById(id).checked;
         }
     };
    </script>
<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server">
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound"  ClientIDMode="Static" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server"  class="ms-crm-List-Header">
            <tr id="Tr1" runat="server">
             
                
                <th id="Th4" runat="server" align="right" >
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort"  ForeColor="Blue" CommandArgument="numDocumento" runat="server">DOCUMENTO</asp:LinkButton>
                </th>
                <th id="Th5" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort"  ForeColor="Blue" CommandArgument="proveedor" runat="server">PROVEEDOR</asp:LinkButton>
                </th>
                <th id="Th15" runat="server">
                    <asp:LinkButton ID="LinkButton14" CommandName="Sort" ForeColor="Blue" CommandArgument="descripcion" runat="server">CONCEPTO</asp:LinkButton>
                </th>
                <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton4" CommandName="Sort" ForeColor="Blue" CommandArgument="fechaEmisionDoc" runat="server">FECHA EMI.</asp:LinkButton>
                </th>
                 <th id="Th1" runat="server">
                <asp:LinkButton ID="lb2" CommandName="Sort" CommandArgument="fechaVencimientoDoc" ForeColor="Blue" runat="server">FECHA VENCIM.</asp:LinkButton>
                </th>
               
               
               
                <th id="Th9" runat="server">
                    <asp:LinkButton ID="LinkButton7" CommandName="Sort" CommandArgument="neto"  ForeColor="Blue" runat="server">SUB TOTAL</asp:LinkButton>
                </th>
                <th id="Th10" runat="server">
                    <asp:LinkButton ID="LinkButton8" CommandName="Sort" CommandArgument="igvtotal" ForeColor="Blue" runat="server">IGV </asp:LinkButton>
                </th>
                <th id="Th11" runat="server">
                    <asp:LinkButton ID="LinkButton9" CommandName="Sort" CommandArgument="total" ForeColor="Blue" runat="server">TOTAL </asp:LinkButton>
                </th>
                <th id="Th12" runat="server">
                    <asp:LinkButton ID="LinkButton10" CommandName="Sort" CommandArgument="numOrdenCompra" ForeColor="Blue" runat="server">ORDEN</asp:LinkButton>
                </th>
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="numRecepcion" ForeColor="Blue" runat="server">FR</asp:LinkButton>
                </th>
                
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
       <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
                    
          
              <td align="right" width="120px">
                 <asp:LinkButton runat= "server"  ToolTip="Numero Documento" ForeColor="Blue"
                 Text='<%# DataBinder.Eval(Container.DataItem,"tipoDocumento").ToString() +":  "+ DataBinder.Eval(Container.DataItem,"numDocumento").ToString()%>'  
                 Target="_self"  
                 ID="LinkButton11"
                 PostBackUrl='<%# "~/ObraAdmin/RecepcionDoc/RecepcionDocInsertForm.aspx?type=NC&idFR="+  DataBinder.Eval (Container.DataItem,"idInternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   


            </td>
            <td align="left" width="250px">
            <%# Eval("proveedor")%><br />
                 
            </td>
            <td  width="150px">
            <%# Eval("descripcion")%><br />
                 
            </td>
             <td align="right" width="70px">
            <%# Eval("fechaEmisionDocStr")%><br />
                 
            </td>
             <td align="right" Width="80px">
            <%# Eval("fechaVencimientoDocStr")%><br />
           
                 
            </td>


            
             <td align="right" Width="90px">
            <%# Eval("netoStr")%>
                 
            </td>

                <td align="right" Width="90px">
            <%# Eval("igvtotalStr")%>
                 
            </td>
                <td align="right" Width="90px">
            <%# Eval("totalStr")%>
                 
            </td>
            <td Width="100px">

             <%# Eval("numOrdenstr")%>
            
               
             </td>
              
                <td width="70px" >
                    <%# Eval("numRecepcion")%> 
            </td>
           
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                    <h2 style="color: Red ; font-size:small">
                  
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>





    
     